<template>
  <div>
    <Element @click="handlerClick" :wrapper-transform="element.transform" v-for="item in curGroupElements" :key="item.id" :element="item"></Element>
  </div>
</template>

<script>
import { Vue, Component, Prop } from 'vue-property-decorator'
import {Getter} from "vuex-class"
import Element from "./GroupElement.vue"
@Component({
  components: {
    Element
  }
})
export default class Group extends Vue {
  @Getter excludeSelectedAndGroupElements
  @Prop(Object) element:any

  get curGroupElements () {
    return this.excludeSelectedAndGroupElements.filter(item => this.element.extra.includes(item.id))
  }
  handlerClick () {
    this.$emit("click")
  }

  
}
</script>
